package com.iis.gui.helper;

import java.util.ArrayList;

import javax.swing.table.DefaultTableModel;

import com.iis.entity.Agent;
import com.iis.entity.Client;

public class ClientGUIHelper {
	
	public static DefaultTableModel populateData(){
		String col[] = {"Registration No","Name","Category"};
		DefaultTableModel tableModel = new DefaultTableModel(col, 0);
		
		ArrayList<Client> arrClients = Client.getAll();
		
		for(Client client : arrClients){
			tableModel.addRow(client.toArray());
		}
		
		return tableModel;	
		
	}
	
	

}
